package cn.zebra.dev.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author runnable@sina.cn
 */
@Configuration
@ConditionalOnProperty(value = JwtAuthenticationConfigureBean.PREFIX + ".enable", matchIfMissing = true)
@ConfigurationProperties(prefix = JwtAuthenticationConfigureBean.PREFIX)
public class JwtAuthenticationConfigureBean {
    static final String PREFIX = "zebra.jwt";

    private Boolean enable = true;
    /**
     * 单点登录
     */
    private boolean sso;

    /**
     * 请求头
     */
    private String header = "token";

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public boolean isSso() {
        return sso;
    }

    public void setSso(boolean sso) {
        this.sso = sso;
    }

    public String getHeader() {
        return header;
    }

    public void setHeader(String header) {
        this.header = header;
    }
}
